|
Author |
Thread Statistics | Show CCP posts - 0 post(s) |

Marcus Ziz
Limitless Momentum
0
|
Posted - 2014.05.03 00:33:00 -
[1] - Quote
Hi everyone,
Did any of you have any success in running EveAI under Linux using Mono? I can't seem to get it to work...
From what I can tell, it seems that EveAI can't find or create the cache file, and when using the advanced mode API without cache (.UpdateData(EveApiBase.UpdateCharaceristics.OnlineOnly)), it still returns ErrorGeneric with ClientDownloadError in the list of errors. The only hint I could find was that this might be caused by proxy settings, but I don't think I have those on my server -- it is a hosted server though, so I guess it is not impossible. Every other program I've tried seems to run without any special settings, though.
My test application:
Quote:static void Main() { EveApi api = new EveApi(9999, "CodeCodeKeyCodeCode", 9999);
CharacterSheet charSheet = api.GetCharacterSheet();
Console.WriteLine("Result: " + api.LastUpdateResult);
if (api.LastErrors.Count > 0) { foreach (var err in api.LastErrors) Console.WriteLine("\t" + err); } else { Console.WriteLine("Character " + charSheet.Name + " has " + charSheet.SkillpointTotal + " skillpoints"); Console.WriteLine("Skills:"); foreach (CharacterSheet.LearnedSkill skill in charSheet.Skills) Console.WriteLine(skill); }
Console.ReadKey(); } This runs fine under Windows, but returns this under Linux:
Quote:Result: ErrorGeneric ClientMissingCacheFile ClientDownloadError ClientMissingCacheFile
Also, it takes about 2 minutes or so for the output to finally show up, no clue if that is relevant though.
Any ideas?
The server is running Ubuntu 12.04.4 LTS, with an up-to-date Mono (compiled from current git one day ago). I am compiling the source using Visual Studio 2013 Express, and then copy it to my Linux server. |

Marcus Ziz
Limitless Momentum
0
|
Posted - 2014.05.04 11:15:00 -
[2] - Quote
Found it! Well, at least one half of it, the cache problem still eludes me for the moment (although I will continue to hunt for it).
EXPLANATION The "ClientDownloadError" was caused by Mono not having a pre-populated SSL Certfificate Store containing trusted root certificates, like windows does. This caused an SSL verification error in the WebClient class used by EveAI, causing the whole thing to fail. It also happens when running the app with Mono under Windows, although there it always threw the SSL certificate error even when querying HTTP instead of HTTPS, while under Linux it returned with a timeout in the HTTP case (which explained the long wait for any output in my last post).
HOW TO FIX
Hope this helps :) |

Marcus Ziz
Limitless Momentum
0
|
Posted - 2014.05.25 10:45:00 -
[3] - Quote
I've not tried this myself yet, so just a suggestion: Are you sure that the API key you are using has both the "MailMessages" and "MailBodies" rights enabled? If it is only the former, it could explain your problems :) |

Marcus Ziz
Limitless Momentum
1
|
Posted - 2014.05.25 10:45:19 -
[4] - Quote
I've not tried this myself yet, so just a suggestion: Are you sure that the API key you are using has both the "MailMessages" and "MailBodies" rights enabled? If it is only the former, it could explain your problems :) |

Marcus Ziz
Limitless Momentum
0
|
Posted - 2014.06.30 19:30:00 -
[5] - Quote
Radelix Cisko wrote:using this code:
"omitted code to process keys and whatnot"
EveApi api = new EveApi(KEY, API, USER); SkillInTraining skill = api.GetCharacterSkillInTraining();
if (skill.IsCurrentlyTraining == true) label1.Text = "true"; else label1.Text = "none";
(...)
however when I run this with a character with no skills in the queue i receive a null reference exception.
In which line do you get the exception? If it happens here:
Quote:if (skill.IsCurrentlyTraining == true) then you probably need to rewrite that as
Quote:if (skill != null && skill.IsCurrentlyTraining == true) since the return value of api.GetCharacterSkillInTraining() could very well be "null" when there is no skill in training. |

Marcus Ziz
Limitless Momentum
1
|
Posted - 2014.06.30 19:30:13 -
[6] - Quote
Radelix Cisko wrote:using this code:
"omitted code to process keys and whatnot"
EveApi api = new EveApi(KEY, API, USER); SkillInTraining skill = api.GetCharacterSkillInTraining();
if (skill.IsCurrentlyTraining == true) label1.Text = "true"; else label1.Text = "none";
(...)
however when I run this with a character with no skills in the queue i receive a null reference exception.
In which line do you get the exception? If it happens here:
Quote:if (skill.IsCurrentlyTraining == true) then you probably need to rewrite that as
Quote:if (skill != null && skill.IsCurrentlyTraining == true) since the return value of api.GetCharacterSkillInTraining() could very well be "null" when there is no skill in training. |
|
|
|